Lecture 14 - Multifactor ANOVA

Author

Bill Perry

Lecture 13: Review

Multifactor ANOVA

  • Example
  • Linear model
  • Analysis of variance
  • Null hypotheses
  • Interactions and main effects
  • Unequal sample size
  • Assumptions

Lecture 13: 2 Factor or 2 Way ANOVA

Often consider more than 1 factor (independent categorical variable):

  • reduce unexplained variance
  • look at interactions

2-factor designs (2-way ANOVA) very common in ecology

  • Can have more factors (e.g., 3-way ANOVA)
    • interpretation tricky…

Most multifactor designs: nested or factorial

Lecture 13: Factorail Versus Nested designs

Consider two factors: A and B

  • Factorial/crossed: every level of B in every level of A
  • Nested/hierarchical: levels of B occur only in 1 level of A

Lecture 14: Nested ANOVA Overview

  • Nested design examples

    • Nested designs
    • Linear model
    • Analysis of variance
    • Null hypotheses
    • Unbalanced designs
    • Assumptions

Lecture 14: Nested Designs

Nested Designs:

  • Factor A usually fixed
  • Factor B usually random

Lecture 14: Nested and factorial designs

Factorial Designs:

  • Both factors typically fixed (but not always)

Lecture 14: Nested designs: examples

Study on effects of enclosure size on limpet growth:

  • 2 enclosure sizes (factor A)
  • 5 replicate enclosures (factor B)
  • 5 replicate limpets per enclosure

Lecture 14: Nested designs: examples

Study on reef fish recruitment: 5 sites (factor A) 6 transects at each site (factor B) replicate observations along each transect

Lecture 14: Nested designs: examples

Effects of sea urchin grazing on biomass of filamentous algae:

  • 4 levels of urchin grazing: none, L, M, H
  • 4 patches of rocky bottom (3-4 m2) nested in each level of grazing
  • 5 replicate quadrats per patch

F

Lecture 14: Factorial designs: examples

Effects of light level on growth of seedlings of different size:

  • 3 light levels (factor A)
  • 3 size classes (factor B)
  • 5 replicate seeding in each cell

Lecture 14: Factorial designs: examples

Effects of food level and tadpole presence on larval salamander growth

  • 2 food levels (factor A)
  • presence/absence of tadpoles (factor B)
  • 8 replicates in each cell

Lecture 14: Factorial designs: examples

Effect of season and density on limpet fecundity.

  • 2 seasons (factor A)
  • 4 density treatments (factor B)
  • 3 replicates in each cell

F

Lecture 14: Nested designs: linear model

Consider a nested design with:

  • p levels of factor A (i= 1…p) (e.g., 4 grazing levels)
  • q levels of factor B (j= 1…q), nested within each level of A (e.g., 4 - diff. patches per grazing level)
  • n replicates (k= 1…n) in each combination of A and B (5 replicate - quadrats in each patch in each grazing level)

I

Lecture 14: Nested designs: linear model

Can calculate several means:

  • overall mean (across all levels of A and B)= ȳ;
  • a mean for each level of A (across all levels of B in that A)= ȳi;
  • a mean for each level of B within each A= ȳj(i)

Lecture 14: Nested designs: linear model

Lecture 14: Nested designs: linear model

The linear model for a nested design is: \[y_{ijk} = \mu + \alpha_i + \beta_{j(i)} + \varepsilon_{ijk}\]

Where:

  • \(y_{ijk}\) is the response variable

    • value of the k-th replicate in j-th level of B in the i-th level of A

    • (algal biomass in 3rd quadrat, in 2nd patch in low grazing treatment)

  • \(\mu\) is the overall mean

    • (overall average algal biomass)

Lecture 14: Nested designs: linear model

The linear model for a nested design is:

The linear model for a nested design is: \[y_{ijk} = \mu + \alpha_i + \beta_{j(i)} + \varepsilon_{ijk}\]

  • \(\alpha_i\) is the fixed effect of factor \(i\)

  • (difference between average biomass in all low grazing level quadrats and overall mean)

  • \(\beta_{j(i)}\) is the random effect of factor \(j\) nested within factor \(i\)

  • usually random variable, measuring variance among all possible levels of B within each level of A

  • (variance among all possible patches that may have been used in the low grazing treatment)

Lecture 14: Nested designs: linear model

The linear model for a nested design is:

The linear model for a nested design is: \[y_{ijk} = \mu + \alpha_i + \beta_{j(i)} + \varepsilon_{ijk}\]

  • \(\varepsilon_{ijk}\) is the error term
  • αi: is the effect of the ith level of A: µi- µ
  • unexplained variance associated with the kth replicate in jth level of B in the ith level of A
  • (difference bw observed algal biomass in 3rd quadrat in 2nd patch in low grazing treatment and predicted biomass - average biomass in 2nd patch in low grazing treatment)

Lecture 14: Nested designs: analysis of variance

As before, partition the variance in the response variable using SS SSA is SS of differences between means in each level of A and overall mean

Lecture 14: Multifactor ANOVA

SSB is SS of difference between means in each level of B and the mean of corresponding level of A summed across levels of A

Lecture 14: Nested designs: analysis of variance

  • SSresid is difference bw each observation and mean for its level of factor B, summed over all observations
  • SStotal = SSA + SSB + SSresid
  • SS can be turned into MS by dividing by appropriate df

Lecture 14: Nested designs: analysis of variance

Lecture 14: Nested designs: null hypotheses

Two hypotheses tested on values of MS:

  1. no effects of factor A
  • Assuming A is fixed:
  • Ho(A): µ1= µ2= µ3=…. µi= µ
  • Same as in 1-factor ANOVA, using means from B factors nested within each - level of A
  • (no difference in algal biomass across all levels of grazing: µnone= - µlow= µmed= µhigh)

Lecture 14: Nested designs: null hypotheses

Two hypotheses tested on values of MS:

  1. No effects of factor B nested in A
  • Assuming B is random:
  • Ho(B): σβ2= 0 (no variance added due to differences between all possible - levels of B)
  • (no variance added due to differences between patches)

Lecture 14: Nested designs: null hypotheses

Conclusions?

“significant variation between replicate patches within each treatment, but no significant difference in amount of filamentous algae between treatments”

Lecture 14: Nested designs: unbalanced designs

Unequal sample sizes can be because of:

  • uneven number of B levels within each A
  • uneven number of replicates within each level of B

Not a problem, unless have unequal variance or large deviation from - normality

Lecture 14: Nested designs: assumptions

As usual, we assume

  • equal variance
  • normality
  • independence of observations

Equal variance + normality need to be assessed at both levels:

  • Since means for each level of B within each A are used for the H-test about A, need to assess whether those means meet normality and equal variance
  • Examine residuals for H-test about B
  • Transformations can be used
Back to top